#! /bin/mksh

. $(realpath "$0" | xargs dirname)/../menu/dmenuconf

DLIST="\
0.7
0.8
1.0
1.1
1.3
1.5
"

AAA="$(echo -e "$DLIST" | dmenu -i -b -p "Enter gamma: value [0.1 .. 2.0]"  -nb "$DMENUBG" -nf "$DMENUFG" -sb "$DMENUFG" -sf "$DMENUBG" -fn "$DMENUFONT")"

#for val in $DLIST ; do
#	if [ "$val" == "$AAA" ] ; then
#		echo "Setting gamma to $val"
#		exec xgamma -gamma $val
#		exit 0
#	fi
#done
if [ $val -lt 0.1 && $val -gt 2.0 ]
then
	echo "Bad gamma value: $val"
	exit 0
fi

exec xgamma -gamma $AAA
